Ext.form.Action.DWRSubmit = function(form, options) {
    Ext.form.Action.Submit.superclass.constructor.call(this, form, options);
}

Ext.extend(Ext.form.Action.DWRSubmit, Ext.form.Action, {
    type : 'DWRSubmit',

    run : function(){
        var o = this.options;
        var paramJson = {};// whatever

//      Must use createDelegate to give the callback the required scope
//      until http://getahead.org/bugs/browse/DWR-116 is fixed...
        o.dwrMethod(paramJson, this.processResponse.createDelegate(this));
    },

//  Process the DWR return value
    processResponse: function(response){
//     blah...
        if (typeof options.callback == "function") {
            options.callback(response);
        } 
    },

});

Ext.form.Action.ACTION_TYPES.DWRSubmit= Ext.form.Action.DWRSubmit;
/*
myForm.doAction("DWRSubmit", {
        dwrMethod: myDWRComponent.processStuff,
        callback: someFunction
    });
 */


Ext.form.Action.DWRLoad = function(form, options) {
    Ext.form.Action.Load.superclass.constructor.call(this, form, options);
}

Ext.extend(Ext.form.Action.DWRLoad, Ext.form.Action, {
    type : 'DWRLoad',

    run : function(){
        var o = this.options;
        var paramJson = {};// whatever

//      Must use createDelegate to give the callback the required scope
//      until http://getahead.org/bugs/browse/DWR-116 is fixed...
        o.dwrMethod(paramJson, this.processResponse.createDelegate(this));
    },

//  Process the DWR return value
    processResponse: function(response){
//     blah...
        if (typeof options.callback == "function") {
            options.callback(response);
        } 
    },
});

Ext.form.Action.ACTION_TYPES.DWRLoad= Ext.form.Action.DWRLoad;



